{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330
{\fonttbl\f0\fnil\fcharset0 Monaco;\f1\fswiss\fcharset0 Helvetica;\f2\fnil\fcharset0 Consolas;
}
{\colortbl;\red255\green255\blue255;\red35\green110\blue37;\red104\green56\blue33;\red118\green15\blue80;
\red137\green19\blue21;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f0\fs24 \cf0 This code represents a preview of code that is still a work in progress.  It does not implement the full WIM protcol yet, but does\
include much of the core functionality of a simple AIM client.\
\
Use of the AIM network requires a developer key   You can get your free developer key at http://developer.aim.com\
Be sure to request a "WIM Key". 
\f1 http://developer.aim.com/wimReg.jsp
\f0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f2\fs26 \cf0 \
This WIMFramework is licensed under the New BSD license and includes code that is Copyright (c) 
\f0\fs24 \cf2 \CocoaLigature0 2008 Stig Brautaset
\f2\fs26 \cf0 \CocoaLigature1 \
\pard\tx280\pardeftab280\ql\qnatural\pardirnatural

\f0\fs24 \cf3 \CocoaLigature0 \
JSON-Framework is available seprarately at http://code.google.com/p/json-framework  - thanks Stig!\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \CocoaLigature1 \
The WimSession is the only class that is publically exported from this framework.  Requests to the AIM network are implemented\
by WimSession - most of the responses from the AIM network are implemented via NSNotification.\
\
This code is part of the AIM for iPhone release.   An future release will include an iPhone project to build a static library (since there is no support for 3rd Party frameworks on the iPhone).  You can use the source code found in this framework project in your iPhone projects as well as Macintosh projects.\
\
\
Notification Names are defined in WimEvents.h.\
\pard\tx280\pardeftab280\ql\qnatural\pardirnatural
\cf0 \CocoaLigature0 \
// You should include a delegate implementation of\
\pard\tx280\pardeftab280\ql\qnatural\pardirnatural
\cf4 @protocol\cf0  WimSessionDelegate <NSObject> for Wimsession events sent from the AIM backend\
\
// Here we make a request to the AIM network\
- (\cf4 IBAction\cf0 )onPresence:(\cf4 id\cf0 )sender\
\{\
	NSLog(\cf5 @"request presence %@"\cf0 , [to stringValue]);\
	[wimSession requestPresenceForAimId:[to stringValue]];\
\}\
\
// our Notification handler listens for responses from the AIM Network\
// the userInfo for most notifications includes a dictionary object which maps to the WIM Events\
// see documention 
\f1 \CocoaLigature1 http://dev.aol.com/aim/web/serverapi_reference\
\pard\tx280\pardeftab280\ql\qnatural\pardirnatural

\f0 \cf0 \CocoaLigature0 \
- (\cf4 void\cf0 ) wimSession:(WimSession *)aWimSession receivedPresenceEvent:(NSDictionary *)buddy\
\{\
  \cf2 // WIM Events will contain a NSDictionary containing the data returned from the WIMServer\cf0 \
  \cf2 // you can valueForKeyPath to access these structures\cf0 \
	NSString *log = [NSString stringWithFormat:\cf5 @"presenceEvent: %@ (%@)\\n"\cf0 , [buddy displayName], [buddy state]];\
  [\cf4 self\cf0  appendLog:log];\
  \
\}\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \CocoaLigature1 \
This code can be made to run in a Tiger/10.4 environment.   the ClientLogin.m code requires functionality\
to generate a HMAC hash- you can use the CommonHMac.c file that is found in OpenDarwin (which is the core of Mac OSX)\
\
\pard\tx280\pardeftab280\ql\qnatural\pardirnatural
\cf3 \CocoaLigature0 Due to licensing issues - we didn't include CommonHMac.c from OpenDarwin in this repository - if you need this functionality\
on Tiger then see if you can use APL licensed code inside your application\
\
\
When I tested with Tiger I changed CommonHMac.c first include to look like this - allowing you to switch between a 10.4 and 10.5 build target\
\
#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4\
#import \cf5 "CommonHMAC.h"\cf3 \
#else \
#import \cf5 <CommonCrypto/CommonHMAC.h>\cf3 \
#endif\
\
You'll need to include CommonHMAC.c, CommonHMAC.h, CommonDigest.h, CommonCryptor.h\
\
\
\
}